{% if proxy.defaults is defined %}
# Defaults for {{ name }}
defaults {{ name }}
{% if proxy.defaults.mode is defined %}
	# Set proxy type
	mode {{ proxy.defaults.mode }}

{% endif %}
{% if proxy.defaults.balance is defined %}
	# Set balance mode
	balance {{ proxy.defaults.balance }}

{% endif %}
{% if proxy.defaults.line is defined %}
{% for l in proxy.defaults.line %}
	# Additional config
	{{ l }}

{% endfor %}
{% endif %}
{% endif %}
{% if proxy.frontend is defined %}
# Front-End for {{ name }}
frontend fe_{{ name }}

{% if proxy.frontend.line is defined %}
{% for l in proxy.frontend.line %}
	# Additional config
	{{ l }}

{% endfor %}
{% endif %}

{% endif %}
{% if proxy.backend is defined %}
# Back-End for {{ name }}
backend be_{{ name }}
{% if proxy.backend.line is defined %}
{% for l in proxy.backend.line %}
	# Additional config
	{{ l }}

{% endfor %}
{% endif %}

{% endif %}
